package com.superteam.zzl.activity.MineActivity;

import android.content.Context;
import android.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Display;
import android.view.View;

import com.superteam.zzl.activity.BaseActivity;
import com.superteam.zzl.activity.R;
import com.superteam.zzl.activity.databinding.ActivitySettingBinding;
import com.superteam.zzl.utils.ScreenUtils;

public class SettingActivity extends BaseActivity {


    private ActivitySettingBinding settingBinding;
    @Override
    public void widgetClick(View v) {
        switch(v.getId()){
            case R.id.tv_login_setting://登录
                startActivityForResult(LoginActivity.class,null,340);
                break;
            case R.id.tv_clean://清除缓存
                showToast("清除缓存");
                break;
            case R.id.tv_about://关于我们
                showToast("关于我们");
                break;
            case R.id.tv_tickling://反馈
                showToast("反馈");
                break;
            case R.id.tv_comment://点赞
                showToast("点赞");
                break;
            case R.id.tv_shareApp://分享App
                showToast("分享App");
                break;
            case R.id.tv_rec_setting://推荐应用
                showToast("推荐应用");
                break;

        }
    }

    @Override
    public ViewDataBinding initDataBinding() {
        settingBinding = DataBindingUtil.setContentView(this,R.layout.activity_setting);
        settingBinding.tvLoginSetting.setWidth(ScreenUtils.getScreenWidth(this)/2);
        settingBinding.tbSetting.setNavigationIcon(R.drawable.back);
        settingBinding.tbSetting.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
                setResult(190,getIntent());
            }
        });
        return settingBinding;
    }

    @Override
    public void initParms(Bundle parms) {

    }

    @Override
    public View bindView() {
        return null;
    }

    @Override
    public void initView(View view) {

    }

    @Override
    public void setListener() {

    }

    @Override
    public void doBusiness(Context mContext) {

    }
}
